#ifndef GRAPHFLOWLIST_H
#define GRAPHFLOWLIST_H
#include <iostream>
#include "graphtypes.h"
#include "GraphFlow.h"
#include "GraphOrientedList.h"

using namespace std;

class Values
{
public :
  summit_t neighbour;
  flow_t capacity;
  flow_t flow;
  Values() { capacity = flow = 0; neighbour = -1;}
  Values(const Values& v) {neighbour=v.neighbour;capacity=v.capacity; flow=v.flow;}
  Values& operator=(Values& v) { capacity = v.capacity; flow = v.flow; neighbour = v.neighbour; return (*this);}
};

class GraphFlowList : public virtual GraphFlow, public virtual GraphOrientedList
{
protected :
  
  vector<Values *> * info;

public :
  GraphFlowList();
  GraphFlowList(const GraphFlow &);
  GraphFlowList(summit_t, edges_t);
  virtual ~GraphFlowList();
  virtual const vector<Values *>& getValues(summit_t i) const;
  virtual flow_t getFlow(summit_t i, summit_t j) const;
  virtual flow_t getCapacity(summit_t i, summit_t j) const;
  virtual void setFlow(summit_t i, summit_t j, flow_t f);
  virtual void setCapacity(summit_t i, summit_t j, flow_t f);
  // Redéfinition des méthodes de GraphOrientedList
  virtual bool areConnected(summit_t i, summit_t j) const;
  virtual void connect(summit_t i, summit_t j);
  virtual void deconnect(summit_t i, summit_t j);
};

#endif
